<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<meta charset="utf-8" name="viewport" content="width=device-width,initial-scale=1.0">
	<script type="text/javascript" src="hammer.js"></script>
	<style type="text/css">
		.box{
			width: 200px;height: 200px;background: #ccc;margin: 50px auto 0;
		}
	</style>
</head>
<body>
	<div class="box"></div>
	<script type="text/javascript">
		window.onload=function(){
			let obox=document.querySelector('.box');
			let hammer=new Hammer(obox,{});
			//快速的点击，<250ms
			hammer.on('tap',function(){
				console.log('tap ')
			})
			//press,慢速点击>250ms
			hammer.on('press',function(){
				console.log('press ')
			})
		
		}
	</script>
</body>
</html>